<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>新建咨询单</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="/static/css/font.css">
        <link rel="stylesheet" href="/static/css/xadmin.css">
		<link rel="stylesheet" href="/static/css/table.css">
        <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="/static/js/xadmin.js"></script>
        <script type="text/javascript" src="/static/js/jquery.min.js"></script>
		<script type="text/javascript" src="/static/js/jquery.form.js"></script>
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
        <style>   
            .layui-table-cell {overflow: visible !important;} 
            .layui-table-box {overflow: visible;}
             .layui-table-body {overflow: visible;}     
            td .layui-form-select{
                margin-top: -10px;
                margin-left: -15px;
                margin-right: -15px;
            } 
            #radio-tab .layui-form-radio>i:hover, #radio-tab .layui-form-radioed>i{
                color: #FFFFFF !important;
            }
            .layui-form-radio, .layui-form-radio *{
                vertical-align:baseline;
            }
        </style>
    </head>
    <body>
        <div class="x-nav">
          <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">演示</a>
            <a><cite>导航元素</cite></a>
          </span>
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <form class="layui-form" id="signupForm" action="{:url('shop/add_order/addorder')}" method="post">
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>订单信息</li>
							  </ul>
							  <div class="layui-tab-content">
                                 <input type="hidden" name="order_sn" value="{$ordersn}"/>
                                 <input type="hidden" name="shop_name" value="{$shopname}"/>
                                 <input type="hidden" name="clerk" value="{$Think.session.admin.nkname}"/>
								 <span>订单编号：{$ordersn}</span>
								 <span style="margin-left:30px;">购买门店：{$shopname}</span>
								 <span style="margin-left:30px;">营业员：{$Think.session.admin.nkname}</span>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>客户信息</li>
								<li><span class="span_border" style="cursor:pointer;" onclick="xadmin.open('查询客户','{:url('shop/add_order/userlist')}',1000,600)">查询客户</span></li>
								<li><span class="span_border" style="cursor:pointer;" onclick="xadmin.open('交易记录','./consulting-log.html',1000,600)">交易记录</span></li>
							  </ul>
							  <div class="layui-tab-content">
								 <span>
									<label>客户姓名</label>
									 <div class="layui-input-inline">
										  <input type="text" id="username" name="username" class="layui-input" onchange="userAjax(this,1)">
									  </div>
							     </span>
								 <span style="margin-left:30px;">
									<label>客户称呼</label>
									 <div class="layui-input-inline">
										  <input type="text" id="nkname" name="nkname" class="layui-input" onchange="userAjax(this,2)">
									  </div>
							     </span>
								 <span style="margin-left:30px;">
									<label>联系方式</label>
									 <div class="layui-input-inline">
										  <input type="text" id="phone" name="phone" class="layui-input" onchange="userAjax(this,3)">
									  </div>
							     </span>
								 <span style="margin-left:30px;">
									<label>备用联系方式</label>
									 <div class="layui-input-inline">
										  <input type="text" id="spare_phone" name="spare_phone" class="layui-input" onchange="userAjax(this,4)">
                                          <input type="hidden" id="uid" name="uid"/>
									  </div>
							     </span>
							  </div>
							  <div class="layui-tab-content">
								<label>相似客户</label>
								<div class="layui-input-inline" id="userdata"></div>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>购买产品</li>
								<li><span class="span_border" style="cursor:pointer;" onclick="xadmin.open('手动添加','{:url('shop/add_order/ogoodslist')}',1000,600)">手动添加</span></li>
							  </ul>
							  <div class="layui-tab-content">
								<div class="layui-tab-content">
									 <span>
										<label>产品条形码</label>
										 <div class="layui-input-inline">
											  <input type="text" id="barcode" class="layui-input">
										  </div>
										  <div class="layui-input-inline">
											  <button type="button" class="layui-btn" onclick="search('barcode')">确认</button>
										  </div>
									 </span>
									 <span style="margin-left:30px;">
										<label>产品型号/简称</label>
										 <div class="layui-input-inline">
											  <input type="text" id="marker" class="layui-input">
										  </div>
										  <div class="layui-input-inline">
											  <button type="button" class="layui-btn" onclick="search('marker')">确认</button>
										  </div>
									 </span>
								  </div>
								  <table class="layui-table layui-form" id="dataTables-sure" lay-filter="dataTables-sure"></table>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>优惠信息</li>
								<li id="radio-tab">是否享受优惠：<span><input type="radio" value="1" lay-filter="acty" title="是" name="act" checked></span><span style="margin-left:20px;"><input type="radio" value="0" lay-filter="acty" title="否" name="act"></span></li>
							  </ul>
							  <div class="layui-tab-content">
								 <div class="layui-tab-content" id="IsPurchased">
									 <span>
										<label><input type="radio" value="0" name="act_type" lay-filter="acttype" title="满减优惠"></label>
										 <div class="layui-input-inline">
											  <input type="text" id="manjian" readonly="readonly" class="layui-input" style="width:200px;" value="无">
                                              <input type="hidden" name="manjian" id="manjian_id">
										  </div>
									 </span>
									 <span style="margin-left:30px;">
										<label><input type="radio" value="1" name="act_type" lay-filter="acttype" title="满折优惠"></label>
										 <div class="layui-input-inline" id="manzhe_dd">
                                                <select name="manzhe" lay-filter="act_bute" id="manzhe">
                                                    <option value="">请选择活动</option>
                                               </select>
                                         </div>
									 </span>
									 <span style="margin-left:30px;">
										<label><input type="radio" value="2" name="act_type" lay-filter="acttype" title="满赠优惠"></label>
										 <div class="layui-input-inline">
											  <select name="manzen" lay-filter="act_bute" id="manzen">
                                                    <option value="">请选择活动</option>
                                               </select>
										  </div>
									 </span>
									 <span style="margin-left:30px;">
										<label><input type="radio" value="3" name="act_type" lay-filter="acttype" title="折扣优惠"></label>
										 <div class="layui-input-inline" id="zhekou_dd">
											  <select name="zhekou" lay-filter="act_bute" id="zhekou">
                                                    <option value="">请选择活动</option>
                                               </select>
										  </div>
									 </span>
								  </div>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>订单备注</li>
							  </ul>
							  <div class="layui-tab-content">
									<textarea placeholder="请输入内容" id="desc" name="desc" class="layui-textarea"></textarea>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>订单金额</li>
							  </ul>
							  <div class="layui-tab-content">
								 <div class="layui-tab-content">
									 <span>
										<label>订单金额（元)</label>
										 <div class="layui-input-inline">
											  <input type="text" id="payorder" name="pay_order" readonly="readonly" class="layui-input">
										  </div>
									 </span>
									 <span style="margin-left:30px;">
										<label>实收金额（元）</label>
										 <div class="layui-input-inline">
											  <input type="text" id="actual" name="pay_actual" onchange="payactual(this)" class="layui-input">
										  </div>
									 </span>
									 <span style="margin-left:30px;">
										<label>待付款金额（元）</label>
										 <div class="layui-input-inline">
											  <input type="text" id="payawait" name="pay_await" readonly="readonly" class="layui-input">
										  </div>
									 </span>
									 <span style="margin-left:30px;">
										<label>找零（元）</label>
										 <div class="layui-input-inline">
											  <input type="text" id="payrecall" name="pay_recall" readonly="readonly" class="layui-input" value="0">
										  </div>
									 </span>
								  </div>
								  <div class="layui-tab-content">
									支付方式：
										<span><input type="radio" name="pay_type" value="0" title="现金支付" checked></span>
										<span style="margin-left:20px;"><input type="radio" name="pay_type" value="1" title="手机支付"></span>
										<span style="margin-left:20px;"><input type="radio" name="pay_type" value="2" title="银行卡支付"></span>
								  </div>
							  </div>
							</div>
							<div class="layui-tab-content">
								<div class="layui-form-item">
                                        <div id="hidden-content"></div>
									  <button  class="layui-btn" lay-filter="add" lay-submit="">确认购买</button>
								  </div>
							</div>
                        </div>
                        </form>
                    </div>
                </div>
            </div>
        </div> 
        <script type="text/html" id="selectGxmc" >    
            <select name="pricetype[]" lay-filter="zflx"><option value="1">零售价</option><option value="2">批发价</option></select>
        </script>
		<script type="text/javascript" src="/static/customized/shop/addorder.js"></script>
    </body>
</html>